package com.zzy.vod.utils;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @Author KAZU
 * @Date 2023/1/16 12:14
 * @Version 1.0
 */
@SuppressWarnings({"all"})
@Component
@ConfigurationProperties(prefix = "aliyun.vod.file")
//@PropertySource("classpath:application.yml")
@Data
public class ConstantVodUtils implements InitializingBean {
	
//	@Value("${aliyun.vod.file.keyid}")
	private String keyid;
	
//	@Value("${aliyun.vod.file.keysecret}")
	private String keysecret;
	
	public static String ACCESS_KEY_ID;
	
	public static String ACCESS_KEY_SECRET;
	
	@Override
	public void afterPropertiesSet() throws Exception {
		ACCESS_KEY_ID = keyid;
		ACCESS_KEY_SECRET = keysecret;
	}
}
